<?php

namespace App\Http\Requests\Api;

use App\Http\Requests\BaseRequest;

class MenuRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required',
            'file' => 'required',
            'path' => 'required',
            'pid' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '菜单名称不能为空',
            'file.required' => '菜单文件不能为空',
            'path.required' => '菜单路径不能为空',
            'pid.required' => '父级id不能为空',
        ];
    }
}
